﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Frame.Lib.Core.Para
{
    public partial class ParaInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "s_Para";
        }
        public override string GetInsertSql()
        {
            return "insert into s_Para ( [ID], [Value], [Remark], [Orders]) values ( @ID, @Value, @Remark, @Orders)";
        }
        public override string GetUpdateSql()
        {
            return "update s_Para set  [Value] = @Value, [Remark] = @Remark, [Orders] = @Orders where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public String ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Value
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Remark
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 Orders
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (String)value;
                    break;
                case "value":
                    this.Value = (String)value;
                    break;
                case "remark":
                    this.Remark = (String)value;
                    break;
                case "orders":
                    this.Orders = (Int32)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "value":
                    return this.Value;
                case "remark":
                    return this.Remark;
                case "orders":
                    return this.Orders;
                default:
                    return null;
            }
        }
    }



}
